package com.netty.esc.entity.neo4j.relationship;

import com.netty.esc.entity.neo4j.node.PersonEntity;
import lombok.Data;
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Relationship;
import org.springframework.data.neo4j.core.schema.RelationshipId;
import org.springframework.data.neo4j.core.schema.RelationshipProperties;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

//import org.neo4j.ogm.annotation.RelationshipEntity;

/**
 * 黑名单关系实体
 */
@RelationshipProperties
@Data
public class BlacklistRelation {

    @RelationshipId
    @GeneratedValue
    private Long id;

    //黑名单关系建立时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date time;

    //关系中其他属性待添加..

    @Relationship(direction = Relationship.Direction.INCOMING,value = "blacklist")
    private PersonEntity personStartEntity;

    @Relationship(direction = Relationship.Direction.OUTGOING, value = "blacklist")
    private PersonEntity personEndEntity;




}
